/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.erp.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author adao
 */
@Entity
@Table(name = "BuscaImovel")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BuscaImovel.findAll", query = "SELECT b FROM BuscaImovel b"),
    @NamedQuery(name = "BuscaImovel.findByBuscaImovel", query = "SELECT b FROM BuscaImovel b WHERE b.buscaImovel = :buscaImovel"),
    @NamedQuery(name = "BuscaImovel.findByDataInclussao", query = "SELECT b FROM BuscaImovel b WHERE b.dataInclussao = :dataInclussao"),
    @NamedQuery(name = "BuscaImovel.findByDescricao", query = "SELECT b FROM BuscaImovel b WHERE b.descricao = :descricao"),
    @NamedQuery(name = "BuscaImovel.findByEmail", query = "SELECT b FROM BuscaImovel b WHERE b.email = :email"),
    @NamedQuery(name = "BuscaImovel.findByNome", query = "SELECT b FROM BuscaImovel b WHERE b.nome = :nome"),
    @NamedQuery(name = "BuscaImovel.findByTelefone", query = "SELECT b FROM BuscaImovel b WHERE b.telefone = :telefone")})
public class BuscaImovel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "buscaImovel")
    private Long buscaImovel;
    @Column(name = "dataInclussao")
    @Temporal(TemporalType.DATE)
    private Date dataInclussao;
    @Size(max = 255)
    @Column(name = "descricao")
    private String descricao;
    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="E-mail inválido")//if the field contains email address consider using this annotation to enforce field validation
    @Size(max = 255)
    @Column(name = "email")
    private String email;
    @Size(max = 255)
    @Column(name = "nome")
    private String nome;
    @Size(max = 255)
    @Column(name = "telefone")
    private String telefone;

    public BuscaImovel() {
    }

    public BuscaImovel(Long buscaImovel) {
        this.buscaImovel = buscaImovel;
    }

    public Long getBuscaImovel() {
        return buscaImovel;
    }

    public void setBuscaImovel(Long buscaImovel) {
        this.buscaImovel = buscaImovel;
    }

    public Date getDataInclussao() {
        return dataInclussao;
    }

    public void setDataInclussao(Date dataInclussao) {
        this.dataInclussao = dataInclussao;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getTelefone() {
        return telefone;
    }

    public void setTelefone(String telefone) {
        this.telefone = telefone;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (buscaImovel != null ? buscaImovel.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BuscaImovel)) {
            return false;
        }
        BuscaImovel other = (BuscaImovel) object;
        if ((this.buscaImovel == null && other.buscaImovel != null) || (this.buscaImovel != null && !this.buscaImovel.equals(other.buscaImovel))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.fgv.erp.modelo.BuscaImovel[ buscaImovel=" + buscaImovel + " ]";
    }
    
}
